Skip to content

added output parameter#875

Open
rkritika1508 wants to merge 2 commits into
ProjectTech4DevAI:mainfrom
tattle-made:feat/guardrails-output-param
Open

added output parameter#875
rkritika1508 wants to merge 2 commits into
ProjectTech4DevAI:mainfrom
tattle-made:feat/guardrails-output-param

Conversation

@rkritika1508
Copy link
Copy Markdown
Collaborator

@rkritika1508 rkritika1508 commented May 21, 2026

Summary

Target issue is #PLEASE_TYPE_ISSUE_NUMBER
Explain the motivation for making this change. What existing problem does the pull request solve?

  • Output guardrails now receive both the user's original input and the LLM's response when calling the guardrails service. Previously, apply_output_guardrails was passing the LLM output as input_text, which meant validators that evaluate input/output pairs (e.g. answer relevance) couldn't function correctly.
  • run_guardrails_validation accepts a new optional output_text parameter that, when provided, is included as "output" in the guardrails service payload — keeping the field absent for input-only validators.
  • apply_output_guardrails now accepts input_text and passes the user's original query as input and the LLM response as output in the payload.

Checklist

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.
  • If you've fixed a bug or added code that is tested and has test cases.

Notes

Please add here if any other information is required for the reviewer.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ready-for-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 154c0b9c-e08b-4713-81c4-0fda9d92a8f8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sentry
Copy link
Copy Markdown

sentry Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant